package zhaojinzhen.dao;

import zhaojinzhen.entity.ZjzEntity;
import org.hibernate.Query;
import org.hibernate.transform.Transformers;
import org.springframework.orm.hibernate4.support.HibernateDaoSupport;
import org.springframework.stereotype.Component;

import java.util.List;



@Component()
public class ZjzDao extends HibernateDaoSupport {

    public List<ZjzEntity> query() {
        Query query=getSessionFactory().openSession().createQuery("from ZjzEntity");
        return  query.list();
    }
}

